package operand;

/**
 * The {@link OperandVisitor} interface provides handle methods for {@link MyValue}, {@link MyError} and {@link MyStop}.
 */
public interface OperandVisitor<T> {
	
	/**
	 * Method that executed when the implementation of {@link Operand} is a {@link MyValue}.
	 * @param value is a {@link MyValue}.
	 * @return a {@link Operand}.
	 */
	Operand<T> visit(MyValue<T> value);
	/**
	 * Method that executed when the implementation of {@link Operand} is a {@link MyError}.
	 * @param error is a {@link MyError}.
	 * @return a {@link MyError}.
	 */
	MyError<T> visit(MyError<T> error);
	/**
	 * Method that executed when the implementation of {@link Operand} is a {@link MyStop}.
	 * @param stop is a {@link MyStop}.
	 * @return a {@link MyStop}.
	 */
	MyStop<T> visit(MyStop<T> stop);
}
